<?php
header("Content-type: text/html; charset=utf-8");


//定义数据库的链接
//author:化缘

 $dbhost="127.0.0.1";
 $dbport="3306";
 $dbuser="root";
 $dbpass="1234";
 $dbname="libraryoa";


 $link=mysql_connect($dbhost.':'.$dbport,$dbuser,$dbpass);

 if (!$link) {
 	die('<b>数据库连接失败</b>');
 	exit;
 } 

// 连从库
// $link=mysql_connect(SAE_MYSQL_HOST_S.':'.SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS);

if($link)
{
    mysql_select_db($dbname,$link);
    mysql_query("set names utf8");

}
    //your code goes here






?>